package kr.ac.jejuuniv.repository;

import java.sql.SQLException;

import kr.ac.jejuuniv.model.Bookmark;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;

@Repository
public class IbatisBookmarkRepositoryImpl implements BookmarkRepository {
	@Autowired
	private SqlMapClient sqlMapClient;
	
	public void insert(Bookmark bookmark) {
		try {
			this.sqlMapClient.insert("Bookmark.insertBookmark",bookmark);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public void delete(String id) {
		try {
			this.sqlMapClient.insert("Bookmark.deleteBookmark",id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

}
